home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / grphwiz.dxr / 00095_cut button.ls < prev    next >
Encoding:
Text File  |  2000-01-14  |  1.3 KB  |  56 lines

  1. property ancestor, pMIAW, pCursor
  2. global gTableClipboard, gIsRolloverTextOn
  3.  
  4. on new me, buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant
  5.   if objectp(descendant) then
  6.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, descendant)
  7.   else
  8.     ancestor = new(script("button with balloon"), buttonName, castName, theChannel, theStageLoc, theBalloonChannel, theBalloonLoc, me)
  9.   end if
  10.   pCursor = [member("point hand", "graph.cst"), member("point hand mask", "graph.cst")]
  11.   return me
  12. end
  13.  
  14. on setMIAW me, miaw
  15.   pMIAW = miaw
  16.   return me
  17. end
  18.  
  19. on performFunction me
  20.   if checkIfSelected(getTable(pMIAW)) then
  21.     tell the stage
  22.       playSFX(5)
  23.     end tell
  24.     theData = cutSelectedData(getTable(pMIAW))
  25.     gTableClipboard = theData
  26.     enable(getPasteButton(pMIAW))
  27.   else
  28.     beep()
  29.   end if
  30.   return me
  31. end
  32.  
  33. on enable me
  34.   enable(ancestor)
  35.   set the cursor of sprite the pChannel of me to pCursor
  36. end
  37.  
  38. on disable me
  39.   disable(ancestor)
  40.   set the cursor of sprite the pChannel of me to -1
  41. end
  42.  
  43. on performRolloverFunction me
  44.   if gIsRolloverTextOn then
  45.     performRolloverFunction(ancestor)
  46.   end if
  47.   return me
  48. end
  49.  
  50. on performRolloffFunction me
  51.   if gIsRolloverTextOn then
  52.     performRolloffFunction(ancestor)
  53.   end if
  54.   return me
  55. end
  56.